/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2013/04/30
* File: RenderStates.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#pragma once

#include "RenderDef.h"

namespace HY
{
class RenderStates
{
public:
	uint32 getFillMode() const;
	void setFillMode(uint32 val);

	uint32 getCullMode() const;
	void setCullMode(uint32 val);

	bool getZEnable() const;
	void setZEnable(bool val);

	bool getZWriteEnable() const;
	void setZWriteEnable(bool val);

	uint32 getZFunc() const;
	void setZFunc(uint32 val);

	float getZBias() const;
	void setZBias(float value);

	bool getBlendEnable() const;
	void setBlendEnable(bool val);

	uint32 getSrcBlendFunc() const;
	void setSrcBlendFunc(uint32 val);

	uint32 getDstBlendFunc() const;
	void setDstBlendFunc(uint32 val);

	float getLineWidth() const;
	void setLineWidth(float val);

public:
	RenderStates();
	virtual ~RenderStates();

	uint32 get(uint32 render_state) const;
	bool set(uint32 render_state, uint32 val);

protected:
	uint32 render_states_[RenderState::Number];
};
}